#include <stdio.h>

int main() {
   int a;
    while(scanf("%d", &a)!=EOF){
        do{
            printf("%d",a%10);
            a /= 10;
        }while(a > 0);
    }
   return 0;
}

